﻿@using Abp.Application.Services.Dto;
@using FwProject.Settlement.Dto
@using FwProject.Authorization
@model List<CapitalPoolDto>
@{
    ViewBag.Title = "资金池";
}
@section styles{
    <link href="~/Theme/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
    <style type="text/css">
        .input-group[class*=col-] {
            padding: 0 15px;
        }
    </style>
}
<div class="row wrapper wrapper-content animated fadeInRight">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>@ViewBag.Title</h5>
                <div class="ibox-tools">
                    <a class="collapse-link">
                        <i class="fa fa-chevron-up"></i>
                    </a>
                    <a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
                        <i class="fa fa-wrench"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-user">
                        <li>
                            <a href="javascript:Print()">打印</a>
                        </li>
                        <li>
                            <a href="javascript:Export()">导出</a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="ibox-content">
                <div class="row m-b-sm m-t-sm">
                    <form class="form-horizontal" id="form" asp-controller="FinanceReport" asp-action="CapitalPool" data-ajax="true" data-ajax-update="#data_list" data-ajax-method="Get" data-ajax-mode="replace">
                        <div class="col-lg-3 col-md-4">
                            <label class="control-label col-lg-3 col-md-4">截止日期：</label>
                            <div class="input-group">
                                <input type="text" name="date" id="date" value="@DateTime.Now.ToString("yyyy-MM-dd")" class="input-sm form-control" style="width:155px" autocomplete="off">
                                <span>
                                    <button type="submit" class="btn btn-sm btn-primary">查询</button>
                                </span>
                            </div>
                        </div>
                        @*<div class="col-lg-1 col-md-1">
                                <button type="submit" class="btn btn-sm btn-primary">查询</button>
                            </div>*@
                    </form>
                </div>
                <div id="data_list">
                    @*@{Html.RenderPartial("CapitalPoolPartial", Model);}*@
                </div>
            </div>
        </div>
    </div>
</div>
@section scripts{
    <script src="~/Theme/js/content.min.js?v=1.0.0"></script>
    <script src="~/Theme/js/plugins/iCheck/icheck.min.js"></script>
    <script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
    <script src="~/js/PrintUtil.js"></script>
    <script type="text/javascript">
        function Export() {
            var date = $('#date').val();
            window.location.href = "/FinanceReport/ExportCapitalPool?date=" + date ;
        }
        function Print() {
            printGirdObj({
                containerId: 'table_print',//包含表格容器のID
                title: '资金池',
                showRowNum: false,  //表格中rownumbers: true时为true
                showOrder: false,//是否显示序号，rownumbers: true时有效，默认false
                printInit: { //打印初始化设置参数
                    portrait: false //true纵向,false横向
                }
            });
        }

        $(document).ready(function () {
            $('#form').submit();

            $('#date').datepicker({
                todayBtn: "linked",
                autoclose: true,
                todayHighlight: true
            })
        });
        function ReloadAjaxCallbackgoback(data, successInfo) {
            CommonAjaxCallback(data, function () {
                window.location.reload();
            }, successInfo);
        }

    </script>
}
